package com.fun_ordering.service.impl;

import com.fun_ordering.mapper.FoLossMapper;
import com.fun_ordering.mapper.FoOrderMapper;
import com.fun_ordering.mapper.MaterialStockMapper;
import com.fun_ordering.pojo.FoLoss;
import com.fun_ordering.pojo.FoOrder;
import com.fun_ordering.pojo.MaterialStock;
import com.fun_ordering.service.FoLossService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 陈星
 * @date 2024/4/11 13:10
 */
@Service
public class FoLossServiceImpl implements FoLossService {
    @Autowired
    private FoLossMapper foLossMapper;
    @Autowired
    private MaterialStockMapper materialStockMapper;
    @Autowired
    private FoOrderMapper foOrderMapper;
    @Override
    public List<FoLoss> findAll() {
        return foLossMapper.selectByExample(null);
    }


    @Override
    public List<FoLoss> findTotalPrice() {
        //材料库存表
        List<MaterialStock> materialStockList = materialStockMapper.selectByExample(null);
        //损耗表
        List<FoLoss> foLossList = foLossMapper.selectByExample(null);
        List<FoOrder> foOrderList = foOrderMapper.selectByExample(null);
        for (int i = 0; i < foLossList.size(); i++) {
            FoOrder foOrder = foOrderList.get(i);

        }



        return null;
    }
}
